@model PoliciesModel
@inject Bit.Core.Services.II18nService i18nService
@{
    ViewData["Title"] = i18nService.T("Policies");
}

<div class="page-header">
    <h1>@i18nService.T("Policies")</h1>
</div>

<div class="table-responsive">
    <table class="table table-striped table-hover">
        <tbody>
            @foreach (var policyModel in Model.Policies)
            {
                <tr>
                    <td>
                        <a asp-action="Edit" asp-route-type="@policyModel.PolicyType">@i18nService.T(policyModel.NameKey)</a>
                        @if (policyModel.Enabled)
                        {
                            <span class="badge badge-success">@i18nService.T("Enabled")</span>
                        }
                        <small class="text-muted d-block">@i18nService.T(policyModel.DescriptionKey)</small>
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
